<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>JSDoc: Class: PDFJS</title>

    <script src="scripts/prettify/prettify.js"> </script>
    <script src="scripts/prettify/lang-css.js"> </script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>

<body>

<div id="main">

    <h1 class="page-title">Class: PDFJS</h1>

    



<section>

<header>
    <h2>
    PDFJS
    </h2>
    
</header>

<article>
    <div class="container-overview">
    

    
        
<dt>
    <h4 class="name" id="PDFJS"><span class="type-signature"></span>new PDFJS<span class="signature">()</span><span class="type-signature"></span></h4>

    
</dt>
<dd>

    
    <div class="description">
        PDFJS scope object that contains all functions, objects and variables related
to the PDF.js.
    </div>
    

    

    

    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="doc_helper.js.html">doc_helper.js</a>, <a href="doc_helper.js.html#line26">line 26</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    

    

    

    

    

    
</dd>

    
    </div>

    

    

    

    
        <h3 class="subsection-title">Classes</h3>

        <dl>
            <dt><a href="PDFJS.PageViewport.html">PageViewport</a></dt>
            <dd></dd>
        </dl>
    

     

    

    
        <h3 class="subsection-title">Members</h3>

        <dl>
            
<dt>
    <h4 class="name" id="cMapPacked"><span class="type-signature">(static) </span>cMapPacked<span class="type-signature"> :boolean</span></h4>

    
</dt>
<dd>
    
    <div class="description">
        Specifies if CMaps are binary packed.
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">boolean</span>


            </li>
        </ul>
    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="api.js.html">display/api.js</a>, <a href="api.js.html#line45">line 45</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    
</dd>

        
            
<dt>
    <h4 class="name" id="cMapUrl"><span class="type-signature">(static) </span>cMapUrl<span class="type-signature"> :string</span></h4>

    
</dt>
<dd>
    
    <div class="description">
        The url of where the predefined Adobe CMaps are located. Include trailing
slash.
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">string</span>


            </li>
        </ul>
    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="api.js.html">display/api.js</a>, <a href="api.js.html#line39">line 39</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    
</dd>

        
            
<dt>
    <h4 class="name" id="disableAutoFetch"><span class="type-signature">(static) </span>disableAutoFetch<span class="type-signature"> :boolean</span></h4>

    
</dt>
<dd>
    
    <div class="description">
        Disable pre-fetching of PDF file data. When range requests are enabled PDF.js
will automatically keep fetching more data even if it isn't needed to display
the current page. This default behavior can be disabled.

NOTE: It is also necessary to disable streaming, see above,
      in order for disabling of pre-fetching to work correctly.
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">boolean</span>


            </li>
        </ul>
    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="api.js.html">display/api.js</a>, <a href="api.js.html#line107">line 107</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    
</dd>

        
            
<dt>
    <h4 class="name" id="disableCreateObjectURL"><span class="type-signature">(static) </span>disableCreateObjectURL<span class="type-signature"> :boolean</span></h4>

    
</dt>
<dd>
    
    <div class="description">
        Disables URL.createObjectURL usage.
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">boolean</span>


            </li>
        </ul>
    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="api.js.html">display/api.js</a>, <a href="api.js.html#line127">line 127</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    
</dd>

        
            
<dt>
    <h4 class="name" id="disableFontFace"><span class="type-signature">(static) </span>disableFontFace<span class="type-signature"> :boolean</span></h4>

    
</dt>
<dd>
    
    <div class="description">
        By default fonts are converted to OpenType fonts and loaded via font face
rules. If disabled, the font will be rendered using a built in font renderer
that constructs the glyphs with primitive path commands.
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">boolean</span>


            </li>
        </ul>
    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="api.js.html">display/api.js</a>, <a href="api.js.html#line53">line 53</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    
</dd>

        
            
<dt>
    <h4 class="name" id="disableFullscreen"><span class="type-signature">(static) </span>disableFullscreen<span class="type-signature"> :boolean</span></h4>

    
</dt>
<dd>
    
    <div class="description">
        Disables fullscreen support, and by extension Presentation Mode,
in browsers which support the fullscreen API.
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">boolean</span>


            </li>
        </ul>
    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="api.js.html">display/api.js</a>, <a href="api.js.html#line142">line 142</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    
</dd>

        
            
<dt>
    <h4 class="name" id="disableRange"><span class="type-signature">(static) </span>disableRange<span class="type-signature"> :boolean</span></h4>

    
</dt>
<dd>
    
    <div class="description">
        Disable range request loading of PDF files. When enabled and if the server
supports partial content requests then the PDF will be fetched in chunks.
Enabled (false) by default.
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">boolean</span>


            </li>
        </ul>
    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="api.js.html">display/api.js</a>, <a href="api.js.html#line87">line 87</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    
</dd>

        
            
<dt>
    <h4 class="name" id="disableStream"><span class="type-signature">(static) </span>disableStream<span class="type-signature"> :boolean</span></h4>

    
</dt>
<dd>
    
    <div class="description">
        Disable streaming of PDF file data. By default PDF.js attempts to load PDF
in chunks. This default behavior can be disabled.
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">boolean</span>


            </li>
        </ul>
    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="api.js.html">display/api.js</a>, <a href="api.js.html#line95">line 95</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    
</dd>

        
            
<dt>
    <h4 class="name" id="disableWebGL"><span class="type-signature">(static) </span>disableWebGL<span class="type-signature"> :boolean</span></h4>

    
</dt>
<dd>
    
    <div class="description">
        Disables WebGL usage.
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">boolean</span>


            </li>
        </ul>
    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="api.js.html">display/api.js</a>, <a href="api.js.html#line134">line 134</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    
</dd>

        
            
<dt>
    <h4 class="name" id="disableWorker"><span class="type-signature">(static) </span>disableWorker<span class="type-signature"> :boolean</span></h4>

    
</dt>
<dd>
    
    <div class="description">
        Disable the web worker and run all code on the main thread. This will happen
automatically if the browser doesn't support workers or sending typed arrays
to workers.
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">boolean</span>


            </li>
        </ul>
    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="api.js.html">display/api.js</a>, <a href="api.js.html#line70">line 70</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    
</dd>

        
            
<dt>
    <h4 class="name" id="imageResourcesPath"><span class="type-signature">(static) </span>imageResourcesPath<span class="type-signature"> :string</span></h4>

    
</dt>
<dd>
    
    <div class="description">
        Path for image resources, mainly for annotation icons. Include trailing
slash.
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">string</span>


            </li>
        </ul>
    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="api.js.html">display/api.js</a>, <a href="api.js.html#line61">line 61</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    
</dd>

        
            
<dt>
    <h4 class="name" id="maxCanvasPixels"><span class="type-signature">(static) </span>maxCanvasPixels<span class="type-signature"> :number</span></h4>

    
</dt>
<dd>
    
    <div class="description">
        The maximum supported canvas size in total pixels e.g. width * height.
The default value is 4096 * 4096. Use -1 for no limit.
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">number</span>


            </li>
        </ul>
    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="api.js.html">display/api.js</a>, <a href="api.js.html#line168">line 168</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    
</dd>

        
            
<dt>
    <h4 class="name" id="maxImageSize"><span class="type-signature">(static) </span>maxImageSize<span class="type-signature"> :number</span></h4>

    
</dt>
<dd>
    
    <div class="description">
        The maximum allowed image size in total pixels e.g. width * height. Images
above this value will not be drawn. Use -1 for no limit.
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">number</span>


            </li>
        </ul>
    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="api.js.html">display/api.js</a>, <a href="api.js.html#line31">line 31</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    
</dd>

        
            
<dt>
    <h4 class="name" id="openExternalLinksInNewWindow"><span class="type-signature">(static) </span>openExternalLinksInNewWindow<span class="type-signature"> :boolean</span></h4>

    
</dt>
<dd>
    
    <div class="description">
        Opens external links in a new window if enabled. The default behavior opens
external links in the PDF.js window.
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">boolean</span>


            </li>
        </ul>
    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="api.js.html">display/api.js</a>, <a href="api.js.html#line176">line 176</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    
</dd>

        
            
<dt>
    <h4 class="name" id="pdfBug"><span class="type-signature">(static) </span>pdfBug<span class="type-signature"> :boolean</span></h4>

    
</dt>
<dd>
    
    <div class="description">
        Enables special hooks for debugging PDF.js.
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">boolean</span>


            </li>
        </ul>
    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="api.js.html">display/api.js</a>, <a href="api.js.html#line114">line 114</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    
</dd>

        
            
<dt>
    <h4 class="name" id="postMessageTransfers"><span class="type-signature">(static) </span>postMessageTransfers<span class="type-signature"> :boolean</span></h4>

    
</dt>
<dd>
    
    <div class="description">
        Enables transfer usage in postMessage for ArrayBuffers.
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">boolean</span>


            </li>
        </ul>
    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="api.js.html">display/api.js</a>, <a href="api.js.html#line120">line 120</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    
</dd>

        
            
<dt>
    <h4 class="name" id="useOnlyCssZoom"><span class="type-signature">(static) </span>useOnlyCssZoom<span class="type-signature"> :boolean</span></h4>

    
</dt>
<dd>
    
    <div class="description">
        Enables CSS only zooming.
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">boolean</span>


            </li>
        </ul>
    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="api.js.html">display/api.js</a>, <a href="api.js.html#line149">line 149</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    
</dd>

        
            
<dt>
    <h4 class="name" id="verbosity"><span class="type-signature">(static) </span>verbosity<span class="type-signature"> :number</span></h4>

    
</dt>
<dd>
    
    <div class="description">
        Controls the logging level.
The constants from PDFJS.VERBOSITY_LEVELS should be used:
- errors
- warnings [default]
- infos
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">number</span>


            </li>
        </ul>
    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="api.js.html">display/api.js</a>, <a href="api.js.html#line160">line 160</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    
</dd>

        
            
<dt>
    <h4 class="name" id="workerSrc"><span class="type-signature">(static) </span>workerSrc<span class="type-signature"> :string</span></h4>

    
</dt>
<dd>
    
    <div class="description">
        Path and filename of the worker file. Required when the worker is enabled in
development mode. If unspecified in the production build, the worker will be
loaded based on the location of the pdf.js file.
    </div>
    

    
        <h5>Type:</h5>
        <ul>
            <li>
                
<span class="param-type">string</span>


            </li>
        </ul>
    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="api.js.html">display/api.js</a>, <a href="api.js.html#line79">line 79</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    
</dd>

        </dl>
    

    
        <h3 class="subsection-title">Methods</h3>

        <dl>
            
<dt>
    <h4 class="name" id="createPromiseCapability"><span class="type-signature">(static) </span>createPromiseCapability<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="global.html#PromiseCapability">PromiseCapability</a>}</span></h4>

    
</dt>
<dd>

    
    <div class="description">
        Creates a promise capability object.
    </div>
    

    

    

    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="util.js.html">shared/util.js</a>, <a href="util.js.html#line1030">line 1030</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    A capability object contains:
- a Promise, resolve and reject methods.
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="global.html#PromiseCapability">PromiseCapability</a></span>


    </dd>
</dl>

        

    
</dd>

        
            
<dt>
    <h4 class="name" id="getDocument"><span class="type-signature">(static) </span>getDocument<span class="signature">(src, pdfDataRangeTransport, passwordCallback, progressCallback)</span><span class="type-signature"> &rarr; {<a href="PDFDocumentLoadingTask.html">PDFDocumentLoadingTask</a>}</span></h4>

    
</dt>
<dd>

    
    <div class="description">
        This is the main entry point for loading a PDF and interacting with it.
NOTE: If a URL is used to fetch the PDF data a standard XMLHttpRequest(XHR)
is used, which means it must follow the same origin rules that any XHR does
e.g. No cross domain requests without CORS.
    </div>
    

    

    

    
        <h5>Parameters:</h5>
        

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>src</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>
|

<span class="param-type">TypedArray</span>
|

<span class="param-type"><a href="global.html#DocumentInitParameters">DocumentInitParameters</a></span>
|

<span class="param-type"><a href="PDFDataRangeTransport.html">PDFDataRangeTransport</a></span>


            
            </td>

            

            

            <td class="description last">Can be a url to where a PDF is located, a typed array (Uint8Array)
already populated with data or parameter object.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>pdfDataRangeTransport</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="PDFDataRangeTransport.html">PDFDataRangeTransport</a></span>


            
            </td>

            

            

            <td class="description last">(deprecated) It is used
if you want to manually serve range requests for data in the PDF.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>passwordCallback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last">(deprecated) It is used to request a
password if wrong or no password was provided. The callback receives two
parameters: function that needs to be called with new password and reason
(see {PasswordResponses}).</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>progressCallback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last">(deprecated) It is used to be able to
monitor the loading progress of the PDF file (necessary to implement e.g.
a loading bar). The callback receives an {Object} with the properties:
{number} loaded and {number} total.</td>
        </tr>

    
    </tbody>
</table>
    

    
<dl class="details">
    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="api.js.html">display/api.js</a>, <a href="api.js.html#line234">line 234</a>
    </li></ul></dd>
    

    

    

    
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="PDFDocumentLoadingTask.html">PDFDocumentLoadingTask</a></span>


    </dd>
</dl>

        

    
</dd>

        </dl>
    

    

    
</article>

</section>




</div>

<nav>
    <h2><a href="index.html">Index</a></h2><h3>Externals</h3><ul><li><a href="external-Promise.html">Promise</a></li></ul><h3>Classes</h3><ul><li><a href="PDFDataRangeTransport.html">PDFDataRangeTransport</a></li><li><a href="PDFDocumentLoadingTask.html">PDFDocumentLoadingTask</a></li><li><a href="PDFDocumentProxy.html">PDFDocumentProxy</a></li><li><a href="PDFJS.html">PDFJS</a></li><li><a href="PDFJS.PageViewport.html">PageViewport</a></li><li><a href="PDFPageProxy.html">PDFPageProxy</a></li><li><a href="RenderTask.html">RenderTask</a></li></ul><h3><a href="global.html">Global</a></h3>
</nav>

<br clear="both">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha9</a> on Thu Mar 19 2015 18:44:52 GMT+0000 (GMT Standard Time)
</footer>

<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>